package router

import (
	"gitee.com/tang_q/gin-vue3-admin-api/api"
	"github.com/gin-gonic/gin"
)

func MenuRoute() {
	RegisterRoute(func(rgPublic *gin.RouterGroup, rgAuth *gin.RouterGroup) {
		menuApi := api.NewMenuApi()
		//rgPublicMenu := rgPublic.Group("menu").Use(func() gin.HandlerFunc {
		//	return func(ctx *gin.Context) {
		//
		//	}
		//}())
		//{
		//
		//}

		rgAuthMneu := rgAuth.Group("menu")
		{
			rgAuthMneu.GET("/getMenuList", menuApi.GetMenuList)
			rgAuthMneu.POST("/createMenu", menuApi.CreateMenu)
			rgAuthMneu.POST("/addChildItem", menuApi.AddChildItem)
			rgAuthMneu.POST("/update", menuApi.UpdateMenu)
			rgAuthMneu.DELETE("/deleteMenu", menuApi.DeleteMenu)
		}
	})
}
